﻿using Kaiser.Cubic.Service;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Kaiser.Extensions;
namespace Kaiser.Cubic.Areas.China.Controllers
{
    public class ChatMessageController : Controller
    {
        public ActionResult ChatMessage()
        {
            return View();
        }

        public void sendMessage(FormCollection form)
        {
            var service = new CubicServiceClient();
            Message message = new Message();
            message.Email = form["email"];
            message.Content = form["message"];
            message.Company = form["company"];
            message.MsnSky = form["fax"];
            message.ProductName = form["title"];
            message.TelFax = form["telephone"];
            message.MessageId = Guid.NewGuid().GenerateGuid().ToString();
            service.AddMessage(message);
        }

        public ActionResult SendSuccessMessage()
        {
            return View();
        }
    }
}
